
import request from './request'
const http = {
    //get请求
    get (url,params){
        const config = {
            method : 'get',
            url :url,
            params:{}
        }
        if(params) config.params = params
        return request(config)
    },
    // post请求
    post  (url,params){
        const config = {
            method : 'post',
            url :url,
            // params:{}
        }
        if(params) config.params = params
        return  request(config)
    },
    // put请求
    put (url,params) {
        const config = {
            method : 'post',
            url :url,
            params:{}
        }
        if(params) config.params = params
      
        return  request(config)
    }

}
export default http